/**
 * Created by Heiliuer on 2019/4/7 0007.
 */
import React from 'react'
import './index.css'

class InfoList extends React.Component {

    constructor(...args) {
        super(...args)
        this.state = {}
    }

    render() {
        const {list} = this.props
        const itemStyle = {
            width: 100/list.length+'%'
        }
        return <div className="info-list">
            {list.map((item, index) => {
                return <div className="info-item" style={itemStyle} key={index}>
                <div className="info-item_val">{item.value}</div>
                <div className="info-item_tit">{item.title}</div>
            </div>
            })}
        </div>
    }
}

export default InfoList